package com.opgea.crm.services.security;
/*
public class UserDetailsServiceImpl extends JdbcDaoImpl{

	private CrmUserRepository userRepository;

	
	public void setUserRepository(CrmUserRepository userRepository) {
            this.userRepository = userRepository;
	}
	
	@Override
	protected UserDetails createUserDetails(String username, UserDetails userFromUserQuery,
											List<GrantedAuthority> combinedAuthorities) {
		String returnUsername = null;
				try{
			returnUsername = userFromUserQuery.getUsername();
	        if (!isUsernameBasedPrimaryKey()){
	            returnUsername = username;
	        }
		}catch(Exception ex){
			ex.printStackTrace();
		}
        CrmUser crmUser = userRepository.findByLoginId(returnUsername);
        return new CurrentUser(returnUsername, userFromUserQuery.getPassword(), userFromUserQuery.isEnabled(),
                true, true, true, combinedAuthorities, crmUser);
		
	}
}
*/